package com.rth.wx.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

@AllArgsConstructor
public enum WechatMsgTypeEnum {
    SUBSCRIBE("event.subscribe", "用户关注事件"),
    TEXT_MSG("text", "用户发送消息");
    private String type;
    private String desc;

    public static WechatMsgTypeEnum getMsgTypeEnum(String type) {
        WechatMsgTypeEnum[] values = WechatMsgTypeEnum.values();
        for (WechatMsgTypeEnum value : values) {
            if (value.type.equals(type)) {
                return value;
            }
        }
        return null;
    }


}
